package com.jy.api.domain;

import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by hanxi on 2017/8/16.
 */
@Entity
@Data
@NoArgsConstructor
public class ChargeRule {
    @Id
    @Column(length = 50)
    private String id;
    private String name;
    private String storeId;
    /**
     * 充值金额
     */
    private double depositAmount;

    /**
     * 赠送金额
     */
    private double bonusAmount;

    @Column(insertable = false, updatable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date addTime;
    @Column(insertable = false, updatable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;
    private boolean enabled = true;

    public ChargeRule(String id, String storeId) {
        this.id = id;
        this.storeId = storeId;
    }
}
